<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:form id="formP" enctype="multipart/form-data">
	<p:panel header="#{message.header_cadastro_prod}">
		<h:panelGrid columns="2" id="grid">
			<h:outputText style="margin-left:61px;"
				value="#{message.label_marca}" />
			<p:inputText style="margin-left:3px;" size="55"
				value="#{produtoTela.produto.marca}" required="true" />
			<h:outputText style="margin-left:61px;"
				value="#{message.label_descricao}" />
			<p:inputText style="margin-left:3px;" size="55"
				value="#{produtoTela.produto.descricao}" required="true"
				id="idProdTela" />

			<h:outputText style="margin-left:40px;"
				value="#{message.label_uni_medida}" />
			<p:inputText style="margin-left:3px;" size="2"
				value="#{produtoTela.produto.unidadeMedida}" required="true"
				id="idDeProdTela" />
		</h:panelGrid>
		<p:fileUpload label="#{message.botao_foto}"
			fileUploadListener="#{produtoTela.handleFileUpload}" mode="advanced"
			update=":messages" auto="true" sizeLimit="100000"
			style="padding-top:15px;" allowTypes="/(\.|\/)(jpe?g)$/" />

		<p:commandButton icon="ui-icon-disk" value="#{message.botao_salvar}"
			actionListener="#{produtoTela.salvar}" style="margin-top:15px;"
			update=":messages
			,idProdTela,idDeProdTela">
		</p:commandButton>
	</p:panel>

</h:form>
</html>